{extend name="admin@public/main"}

{block name="table"}
<table lay-size="sm" class="layui-table">
    <thead>
    <tr>
        <th width="10">id</th>
        <th width="50">姓名</th>
        <th width="100">内容</th>
        <th width="30">状态</th>
        <th width="100">发布时间</th>
        <th width="100">操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="vo"}
    <tr>
        <td>{$vo.id}</td>
        <td><a href="{$vo.website}">{$vo.name}</a></td>
        <td>{$vo.content}</td>
        <td>{:$vo.state?'审核过':'待审核'}</td>
        <td>{$vo.create_time|date='Y-m-d H:i:s'}</td>
        <td>
            {if auth("$classuri/change") AND !$vo.state}
            <button class="layui-btn layui-btn-xs" href="javascript:;" data-confirm="确定操作该条数据吗？"
               data-post='{:url("$classuri/change")}' data-param='id={$vo.id}&state=1}'>
                通过
            </button>
            {/if}
            {if auth("$classuri/del")}
            <button class="layui-btn layui-btn-xs" href="javascript:;"
               data-confirm="确定要删除吗！" data-post='{:url("$classuri/del")}' data-param='ids={$vo.id}'>
                删除
            </button>
            {/if}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$page|raw}
{/block}

{block name="script"}
<script>

</script>
{/block}